<#assign pageTitle = "${document.title!}-${siteCompany.siteName!}" />
<#assign pageKeywords = "${document.title!},${document.categoryName!}" />
<#assign pageDescription = pageTitle />
<#assign channelId = 11 />
<#assign pageHeader>
    <link rel="stylesheet" href="/static/css/picture/viewer.css">
</#assign>
<#assign pageContent>
    <div class="body-wrap docs-pictures">
        <div class="content-wrap">
            <div class="crumbs pd-20">
                <i class="layui-icon layui-icon-home"></i>
                <a href="#" target="_blank">首页</a>
                <span class="sep">/</span>
                <a href="/document/index.html?categoryId=${document.categoryId}" target="_blank">${document.categoryName!}</a>
                <span class="sep">/</span>
                详情
            </div>
            <div class="work-info-wrap mb-20 clearfix">
                <div class="work-imgs">
                    <h1 class="work-name">${document.title!}</h1>
                    <div class="img-wrap">
                        ${document.intro!}
                    </div>
                    <div class="work-badge mt-20">
                        <#if categoryRoots?? && categoryRoots?size gt 0>
                            <#list categoryRoots as categorys>
                                <a href="/document/index.html?categoryId=${categorys.categoryId}">${categorys.categoryName}</a>
                            </#list>
                        </#if>
                    </div>
                    <div class="declare-info">
                        声明：本网站部分内容由互联网用户自发贡献自行上传，本网站不拥有所有权，也不承担相关法律责任。如果您发现有涉嫌版权的内容，欢迎发送邮件至：service@youtike.com
                        进行举报，并提供相关证据，工作人员会在5个工作日内联系你，一经查实，本站将立刻删除涉嫌侵权内容。
                    </div>
                </div>
                <div class="work-detail-right">
                    <div class="download-wrap mb-20">
                        <#if document.price gt 0 && !isVip && !isBuy>
                           <a href="javascript:void(0)" onclick="buyDocument(${document.id})" class="download-btn"><i class="layui-icon layui-icon-rmb"></i>${document.price/100}元下载</a>
                        <#else>
                            <a href="javascript:void(0)" onclick="downDocument(${document.id})" class="download-btn"><i class="layui-icon layui-icon-download-circle"></i> 下载资料</a>
                        </#if>
                        <#if isFavorite?? && isFavorite?string == "true">
                            <a id="favorite-id" href="javascript:void(0)" onclick="deleteFavorite(${document.id},5,this)" class="layui-btn layui-btn-lg layui-btn-primary favorite-btn fr">
                                取消收藏
                            </a>
                        <#else>
                            <a id="favorite-id" href="javascript:void(0)" onclick="favorites(${document.id},5,this)" class="layui-btn layui-btn-lg layui-btn-primary favorite-btn fr">
                                收藏
                            </a>
                        </#if>
                    </div>
                    <div class="work-detail-info">
                        <ul class="details-wrap">
                            <#if !isVip>
                                <li><span style="color: #eb7350">开通会员全站资料免费下载</span><a href="javascript:void(0)" onclick="buyMember(1)" style="margin-left: 10px" class="layui-btn layui-btn-danger layui-btn-xs">立即开通</a></li>
                            </#if>
                            <li><span>所属专业：</span><span class="color-mode">${subjectName!}</span></li>
                            <li><span>所属类型：</span><span class="">${typeName!}</span></li>
                            <li><span>所属分类：</span><span class="">${document.categoryName!}</span></li>
                            <li><span>文件大小：</span><span class="file-size">${document.fileSize/1024/1024}M</span></li>
                            <li><span>文件格式：</span><span class="file-type">${document.fileExt!}</span></li>
                            <#assign tags = document.tags?split('，') />
                            <#if tags?? && tags?size gt 0>
                                <li>
                                    <span>作品标签：</span>
                                    <#list tags as tag><span class="file-type" style="margin-right: 5px;">${tag!}</span></#list>
                                </li>
                            </#if>
                            <li><span>推荐软件：</span><span>WPS Office 软件工具查看</span></li>
                            <li><span>更新日期：</span><span class="upload-time">${document.updateTime?date}</span></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="content-wrap">
            <h3 class="picture-other-title">来自相同主题的作品</h3>
        </div>
        <div class="content-wrap">
            <div class="articles-list" style="min-height: auto">
                <#if documentList?? && documentList?size gt 0 >
                    <#list documentList as item>
                        <div class="list-items">
                            <div class="list-item">
                                <div class="list-content">
                                    <a href="/document/view/${item.id}.html" target="_blank" class="list-article-img"><img lay-src="${item.cover!}" alt=""></a>
                                    <a href="/document/view/${item.id}.html" target="_blank" class="list-article-title">${item.title!!}</a>
                                    <#assign tags = item.tags?split('，') />
                                    <div class="list-article-info">
                                        <#if tags?? && tags?size gt 0>
                                            <#list tags as tag><span class="file-type" style="margin-right: 5px;">${tag!}</span></#list>
                                        <#else>
                                            <span class="file-type" style="margin-right: 5px;">资料</span>
                                        </#if>
                                    </div>
                                    <div class="list-article-price">
                                        <#if item.price gt 0>
                                            ￥${item.price/100}
                                        <#else>
                                            免费
                                        </#if>
                                    </div>
                                    <div class="list-article-type">
                                        <strong>${item.categoryName!}</strong>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </#list>
                <#else>
                    <div class="data-null">
                        <i class="icon-data-null"></i>
                        <p>小编还没有整理内容哦，去看看其它吧</p>
                    </div>
                </#if>
            </div>
        </div>
    </div>
    <div class="detail-float-header">
        <div class="content-wrap">
            <div class="detail-header-name">${document.title!}</div>
            <div class="detail-header-btn">
                <#if document.price gt 0 && !isVip>
                    <a href="javascript:void(0)" onclick="buyPicture(${document.id})" class="download-btn"><i class="layui-icon layui-icon-rmb"></i>${document.price/100}元下载</a>
                <#else>
                    <a href="javascript:void(0)" onclick="downPicture(${document.id})" class="download-btn"><i class="layui-icon layui-icon-download-circle"></i> 下载资料</a>
                </#if>
                <#if isFavorite?? && isFavorite?string == "true">
                    <a id="favorite-id" href="javascript:void(0)" onclick="deleteFavorite(${document.id},5,this)" class="layui-btn layui-btn-lg layui-btn-primary favorite-btn">
                        取消收藏
                    </a>
                <#else>
                    <a id="favorite-id" href="javascript:void(0)" onclick="favorites(${document.id},5,this)" class="layui-btn layui-btn-lg layui-btn-primary favorite-btn">
                        收藏
                    </a>
                </#if>
            </div>
        </div>
    </div>
</#assign>
<#assign pageFooter>
    <script type="text/javascript">
        var title = "${document.title!}";
        var fileExt = "${document.fileExt!}";
        var userId = ${userId};
        var isBuy = ${isBuy?c};
    </script>
    <script src="/static/js/order.js"></script>
    <script src="/static/js/document/document.js"></script>
</#assign>
<#include "../layouts/layout.ftl">


